/*
 *  session.h - Session management functions
 *  Copyright (c) 2005 Derek Ingrouville (dergro@users.sourceforge.net)
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef _SESSION_H
#define _SESSION_H

typedef struct _MsnSession MsnSession;

#include "connection.h"
#include "account.h"
#include "events.h"
#include "switchboard.h"
#include "notification.h"

struct _MsnSession
{
	MsnAccount *acct;
    MsnContactList *clist;
    MsnNotification *notif;
    GList *sbsessions;
	gboolean connected;
};

MsnSession *msn_session_new ();
void msn_session_free (MsnSession *session);

int msn_session_connect (MsnSession *session, const char *server, unsigned int port);
void msn_session_disconnect (MsnSession *session);

void msn_session_add_switchboard (MsnSession *session, MsnSwitchboard *sboard);
MsnSwitchboard *msn_session_find_switchboard_from_id (MsnSession *session, int id);
void msn_session_remove_switchboard (MsnSession *session, MsnSwitchboard *sboard);

#endif /* _SESSION_H */
